home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung 2 / Power-Programmierung CD 2 (Tewi)(1994).iso / c / library / bcfamily / source / dosopen.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1993-06-12  |  680 b   |  29 lines

  1. //
  2. //      *******************************************************************
  3. //        JdeBP C++ Library Routines          General Public Licence v1.00
  4. //            Copyright (c) 1991,1992     Jonathan de Boyne Pollard
  5. //      *******************************************************************
  6. //
  7. // Part of FamAPI.LIB
  8. //
  9.  
  10. #include "famapi.h"
  11. #include "dosdos.h"
  12.  
  13. USHORT _APICALL
  14. DosDosOpen    ( const char far *FileName,
  15.               unsigned short PMode,
  16.               unsigned short far *HanPtr)
  17. {
  18.     asm push ds ;
  19.     _DS = FP_SEG(FileName) ;
  20.     _DX = FP_OFF(FileName) ;
  21.     _AX = PMode ;
  22.     _AH = 0x3d ;
  23.     Dos3Call() ;
  24.     asm pop ds ;
  25.     if (_FLAGS & 0x0001) return _AX ;
  26.     *HanPtr = _AX ;
  27.     return NO_ERROR ;
  28. }
  29.